package com.amazon.spring8amazon.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 亚马逊平台选品结果表
 * @TableName yibai_amazon_publish_sku_select_result
 */
@TableName(value ="yibai_amazon_publish_sku_select_result")
@Data
public class YibaiAmazonPublishSkuSelectResult implements Serializable {
    /**
     * 自增ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 刊登ID
     */
    private String publishId;

    /**
     * SKU
     */
    private String sku;

    /**
     * 产品中文标题
     */
    private String title;

    /**
     * 是否多属性1: 否 2: 是
     */
    private Integer isMultiAttribute;

    /**
     * 状态:0:待匹配;1:匹配中;2:匹配成功;3:匹配失败;4:刊登成功;5:刊登失败;6:已取消
     */
    private Integer status;

    /**
     * 站点
     */
    private String siteCode;

    /**
     * 账号ID
     */
    private Integer accountId;

    /**
     * 发货大仓ID
     */
    private Integer bigWarehouseId;

    /**
     * 产品状态
     */
    private Integer productStatus;

    /**
     * 产品线ID
     */
    private Integer productLineId;

    /**
     * 数据来源:1:系统生成;2:人工导入;3:手动刊登
     */
    private Integer source;

    /**
     * 最后更新人工号
     */
    private String updatedBy;

    /**
     * 创建人工号
     */
    private String createdBy;

    /**
     * 取消人工号
     */
    private String cancelBy;

    /**
     * 销售员工号
     */
    private String saleBy;

    /**
     * 错误编码
     */
    private String errorCode;

    /**
     * 失败信息
     */
    private String errorMessage;

    /**
     * 创建时间
     */
    private Integer createdUnix;

    /**
     * 取消时间
     */
    private Integer cancelUnix;

    /**
     * 操作时间
     */
    private Integer updatedUnix;

    /**
     * 导入时间
     */
    private Integer importUnix;

    /**
     * 创建信息
     */
    private String createMessage;

    /**
     * 取消信息
     */
    private String cancelMessage;

    /**
     * 是否推送队列，0否，1是
     */
    private Integer isPushQueue;

    /**
     * 对应选品子规则id(yibai_common_publish_selection_product_rule)
     */
    private Integer productRuleId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        YibaiAmazonPublishSkuSelectResult other = (YibaiAmazonPublishSkuSelectResult) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPublishId() == null ? other.getPublishId() == null : this.getPublishId().equals(other.getPublishId()))
            && (this.getSku() == null ? other.getSku() == null : this.getSku().equals(other.getSku()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getIsMultiAttribute() == null ? other.getIsMultiAttribute() == null : this.getIsMultiAttribute().equals(other.getIsMultiAttribute()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getSiteCode() == null ? other.getSiteCode() == null : this.getSiteCode().equals(other.getSiteCode()))
            && (this.getAccountId() == null ? other.getAccountId() == null : this.getAccountId().equals(other.getAccountId()))
            && (this.getBigWarehouseId() == null ? other.getBigWarehouseId() == null : this.getBigWarehouseId().equals(other.getBigWarehouseId()))
            && (this.getProductStatus() == null ? other.getProductStatus() == null : this.getProductStatus().equals(other.getProductStatus()))
            && (this.getProductLineId() == null ? other.getProductLineId() == null : this.getProductLineId().equals(other.getProductLineId()))
            && (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource()))
            && (this.getUpdatedBy() == null ? other.getUpdatedBy() == null : this.getUpdatedBy().equals(other.getUpdatedBy()))
            && (this.getCreatedBy() == null ? other.getCreatedBy() == null : this.getCreatedBy().equals(other.getCreatedBy()))
            && (this.getCancelBy() == null ? other.getCancelBy() == null : this.getCancelBy().equals(other.getCancelBy()))
            && (this.getSaleBy() == null ? other.getSaleBy() == null : this.getSaleBy().equals(other.getSaleBy()))
            && (this.getErrorCode() == null ? other.getErrorCode() == null : this.getErrorCode().equals(other.getErrorCode()))
            && (this.getErrorMessage() == null ? other.getErrorMessage() == null : this.getErrorMessage().equals(other.getErrorMessage()))
            && (this.getCreatedUnix() == null ? other.getCreatedUnix() == null : this.getCreatedUnix().equals(other.getCreatedUnix()))
            && (this.getCancelUnix() == null ? other.getCancelUnix() == null : this.getCancelUnix().equals(other.getCancelUnix()))
            && (this.getUpdatedUnix() == null ? other.getUpdatedUnix() == null : this.getUpdatedUnix().equals(other.getUpdatedUnix()))
            && (this.getImportUnix() == null ? other.getImportUnix() == null : this.getImportUnix().equals(other.getImportUnix()))
            && (this.getCreateMessage() == null ? other.getCreateMessage() == null : this.getCreateMessage().equals(other.getCreateMessage()))
            && (this.getCancelMessage() == null ? other.getCancelMessage() == null : this.getCancelMessage().equals(other.getCancelMessage()))
            && (this.getIsPushQueue() == null ? other.getIsPushQueue() == null : this.getIsPushQueue().equals(other.getIsPushQueue()))
            && (this.getProductRuleId() == null ? other.getProductRuleId() == null : this.getProductRuleId().equals(other.getProductRuleId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPublishId() == null) ? 0 : getPublishId().hashCode());
        result = prime * result + ((getSku() == null) ? 0 : getSku().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getIsMultiAttribute() == null) ? 0 : getIsMultiAttribute().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getSiteCode() == null) ? 0 : getSiteCode().hashCode());
        result = prime * result + ((getAccountId() == null) ? 0 : getAccountId().hashCode());
        result = prime * result + ((getBigWarehouseId() == null) ? 0 : getBigWarehouseId().hashCode());
        result = prime * result + ((getProductStatus() == null) ? 0 : getProductStatus().hashCode());
        result = prime * result + ((getProductLineId() == null) ? 0 : getProductLineId().hashCode());
        result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode());
        result = prime * result + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
        result = prime * result + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
        result = prime * result + ((getCancelBy() == null) ? 0 : getCancelBy().hashCode());
        result = prime * result + ((getSaleBy() == null) ? 0 : getSaleBy().hashCode());
        result = prime * result + ((getErrorCode() == null) ? 0 : getErrorCode().hashCode());
        result = prime * result + ((getErrorMessage() == null) ? 0 : getErrorMessage().hashCode());
        result = prime * result + ((getCreatedUnix() == null) ? 0 : getCreatedUnix().hashCode());
        result = prime * result + ((getCancelUnix() == null) ? 0 : getCancelUnix().hashCode());
        result = prime * result + ((getUpdatedUnix() == null) ? 0 : getUpdatedUnix().hashCode());
        result = prime * result + ((getImportUnix() == null) ? 0 : getImportUnix().hashCode());
        result = prime * result + ((getCreateMessage() == null) ? 0 : getCreateMessage().hashCode());
        result = prime * result + ((getCancelMessage() == null) ? 0 : getCancelMessage().hashCode());
        result = prime * result + ((getIsPushQueue() == null) ? 0 : getIsPushQueue().hashCode());
        result = prime * result + ((getProductRuleId() == null) ? 0 : getProductRuleId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", publishId=").append(publishId);
        sb.append(", sku=").append(sku);
        sb.append(", title=").append(title);
        sb.append(", isMultiAttribute=").append(isMultiAttribute);
        sb.append(", status=").append(status);
        sb.append(", siteCode=").append(siteCode);
        sb.append(", accountId=").append(accountId);
        sb.append(", bigWarehouseId=").append(bigWarehouseId);
        sb.append(", productStatus=").append(productStatus);
        sb.append(", productLineId=").append(productLineId);
        sb.append(", source=").append(source);
        sb.append(", updatedBy=").append(updatedBy);
        sb.append(", createdBy=").append(createdBy);
        sb.append(", cancelBy=").append(cancelBy);
        sb.append(", saleBy=").append(saleBy);
        sb.append(", errorCode=").append(errorCode);
        sb.append(", errorMessage=").append(errorMessage);
        sb.append(", createdUnix=").append(createdUnix);
        sb.append(", cancelUnix=").append(cancelUnix);
        sb.append(", updatedUnix=").append(updatedUnix);
        sb.append(", importUnix=").append(importUnix);
        sb.append(", createMessage=").append(createMessage);
        sb.append(", cancelMessage=").append(cancelMessage);
        sb.append(", isPushQueue=").append(isPushQueue);
        sb.append(", productRuleId=").append(productRuleId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    private YibaiSystemAccount yibaiSystemAccount; // 刊登选品表连接账号表时候变量使用



}